home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / webmaste / csehtmlp / csehtmlp.exe / {app} / ParserRules / asp(vbs)_html.xs next >
Encoding:
Text File  |  2002-04-22  |  5.3 KB  |  153 lines

  1. //Language: ASP in HTML 
  2. //Copyright (c) 1992-2002 Altium Limited           
  3. //All rights reserved.                                                                                
  4. //http://www.dream-com.com                         
  5. //contact@dream-com.com                            
  6.  
  7. // states
  8. State=snormal
  9. State=sstring1
  10. State=sstring2
  11. State=sstring3
  12. State=scomment1
  13. State=scomment2
  14. State=scomment3
  15. State=shtmltag
  16. State=shtmlVBS
  17. // tokens
  18. Token=tnone
  19. Token=tstring
  20. Token=tcomment
  21. Token=tident
  22. Token=tinteger
  23. Token=tfloat
  24. Token=tresword
  25. Token=tassembler
  26. Token=turl
  27. Token=twhitespace
  28. Token=tdirective
  29. Token=tresword1
  30. //delims
  31. Delimiters=;.,:'"{}[]()?!@#$%^&*-+=|\/
  32.  
  33.  
  34. // numbers
  35. shtmltag [0-9][0-9]*              shtmltag  tinteger
  36. shtmltag \#[0-9A-F]+              shtmltag  tinteger
  37. shtmltag [1-9][0-9]*\.[0-9]*                    shtmltag  tfloat
  38. shtmltag [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmltag  tfloat
  39.  
  40. //white space
  41. snormal #32*                      snormal   twhitespace
  42.  
  43. //strings
  44. shtmltag   \'                     sstring1   tstring
  45. sstring1   [^\']*                 sstring1   tstring
  46. sstring1   \'                     shtmltag   tstring
  47. sstring1   \'\'                   sstring1   tstring
  48. sstring1   $                      shtmltag   tstring
  49.  
  50. //strings
  51. shtmltag    \"                    sstring2   tstring
  52. sstring2   [^\"]*                 sstring2   tstring
  53. sstring2   \"                     shtmltag   tstring
  54. sstring2   \"\"                   sstring2   tstring
  55. sstring2   $                      shtmltag   tstring
  56.  
  57. //Common
  58. snormal <                          shtmltag  tresword
  59. shtmltag [^\>^\'^\"^\0-9^#32^\=][^\>^\'^\"^#32^\=]*              shtmltag  tresword
  60. shtmltag >                         snormal   tresword
  61.  
  62. //comments
  63. snormal   <\!--                    scomment1 tcomment
  64. scomment1 [^\-]*                   scomment1 tcomment
  65. scomment1  -->                     snormal   tcomment
  66.  
  67. //VBS
  68. snormal  <%                        shtmlVBS  tresword1
  69. shtmlVBS   [a-z_A-Z0-9#33#35-#38#40-#43#45-#47#58#59#61#63#64#92-#96#123-#127]*     shtmlVBS   tresword1
  70. shtmlVBS %>                        snormal   tresword1
  71.  
  72. // reswords
  73. shtmlVBS 'And'       shtmlVBS tresword
  74. shtmlVBS 'As'        shtmlVBS tresword
  75. shtmlVBS 'Attribute' shtmlVBS tresword
  76. shtmlVBS 'Base'      shtmlVBS tresword
  77. shtmlVBS 'ByVal'     shtmlVBS tresword
  78. shtmlVBS 'Call'      shtmlVBS tresword
  79. shtmlVBS 'Case'      shtmlVBS tresword
  80. shtmlVBS 'Compare'   shtmlVBS tresword
  81. shtmlVBS 'Const'     shtmlVBS tresword
  82. shtmlVBS 'Date'      shtmlVBS tresword
  83. shtmlVBS 'Declare'   shtmlVBS tresword
  84. shtmlVBS 'Dim'       shtmlVBS tresword
  85. shtmlVBS 'Do'        shtmlVBS tresword
  86. shtmlVBS 'Each'      shtmlVBS tresword
  87. shtmlVBS 'Else'      shtmlVBS tresword
  88. shtmlVBS 'Elseif'    shtmlVBS tresword
  89. shtmlVBS 'Empty'     shtmlVBS tresword
  90. shtmlVBS 'end'       shtmlVBS tresword
  91. shtmlVBS 'Error'     shtmlVBS tresword
  92. shtmlVBS 'Exit'      shtmlVBS tresword
  93. shtmlVBS 'Explicit'  shtmlVBS tresword
  94. shtmlVBS 'False'     shtmlVBS tresword
  95. shtmlVBS 'For'       shtmlVBS tresword
  96. shtmlVBS 'friend'    shtmlVBS tresword
  97. shtmlVBS 'Function'  shtmlVBS tresword
  98. shtmlVBS 'get'       shtmlVBS tresword
  99. shtmlVBS 'If'        shtmlVBS tresword
  100. shtmlVBS 'Is'        shtmlVBS tresword
  101. shtmlVBS 'let'       shtmlVBS tresword
  102. shtmlVBS 'Loop'      shtmlVBS tresword
  103. shtmlVBS 'Mod'       shtmlVBS tresword
  104. shtmlVBS 'Next'      shtmlVBS tresword
  105. shtmlVBS 'Not'       shtmlVBS tresword
  106. shtmlVBS 'Nothing'   shtmlVBS tresword
  107. shtmlVBS 'Null'      shtmlVBS tresword
  108. shtmlVBS 'On'        shtmlVBS tresword
  109. shtmlVBS 'Option'    shtmlVBS tresword
  110. shtmlVBS 'Or'        shtmlVBS tresword
  111. shtmlVBS 'Private'   shtmlVBS tresword
  112. shtmlVBS 'property'  shtmlVBS tresword
  113. shtmlVBS 'Public'    shtmlVBS tresword
  114. shtmlVBS 'ReDim'     shtmlVBS tresword
  115. shtmlVBS 'Select'    shtmlVBS tresword
  116. shtmlVBS 'Set'       shtmlVBS tresword
  117. shtmlVBS 'String'    shtmlVBS tresword
  118. shtmlVBS 'Sub'       shtmlVBS tresword
  119. shtmlVBS 'Then'      shtmlVBS tresword
  120. shtmlVBS 'To'        shtmlVBS tresword
  121. shtmlVBS 'True'      shtmlVBS tresword
  122. shtmlVBS 'Type'      shtmlVBS tresword
  123. shtmlVBS 'Wend'      shtmlVBS tresword
  124. shtmlVBS 'While'     shtmlVBS tresword
  125. shtmlVBS 'With'      shtmlVBS tresword
  126. shtmlVBS 'Xor'       shtmlVBS tresword
  127.  
  128. // numbers
  129. shtmlVBS [1-9][0-9]*                            shtmlVBS  tinteger
  130. shtmlVBS [1-9][0-9]*\.[0-9]*                    shtmlVBS  tfloat
  131. shtmlVBS [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmlVBS  tfloat
  132.  
  133. //idents
  134. //shtmlVBS   [A-Z_a-z][0-9A-Z_a-z]*  shtmlVBS   tident
  135.  
  136. //white space
  137. shtmlVBS #32*                      shtmlVBS  twhitespace
  138.  
  139. //comments
  140. shtmlVBS   \'                       scomment2  tcomment
  141. scomment2  [#1-#255]*               shtmlVBS   tcomment
  142. shtmlVBS   rem[^#33-#255]           scomment3  tcomment
  143. scomment3  [#1-#255]*               shtmlVBS   tcomment
  144. scomment2  $                        shtmlVBS   tcomment
  145. scomment3  $                        shtmlVBS   tcomment
  146.  
  147. //strings
  148. shtmlVBS    \"                     sstring3    tstring
  149. sstring3    [^\"]*                 sstring3    tstring
  150. sstring3    \"                     shtmlVBS    tstring
  151. sstring3    \"\"                   sstring3    tstring
  152. sstring3    $                      shtmlVBS    tstring
  153.